import User from './user.js';
import * as Roles from './roles.js'
import completeTask from './tasks.js';
import { completeCount } from './tasks.js';

let user = new User('Ted', Roles.USER);
completeTask(user);
console.log(`Total completed ${completeCount}`);

//completeCount++;
//演示不能能操作这个import的数据 模块数据 看作常量
//不是最佳实践
console.log(`Total completed ${completeCount}`);

User.prototype.work = function() {
    console.log(`${this.name} walks`);
}
user.work();

